package cn.service.common.impl;

import cn.dao.common.EmployeeDao;
import cn.entity.Employee;
import cn.service.common.EmployeeBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("employeeBiz")
public class EmployeeBizImpl implements EmployeeBiz {
    @Autowired
    private EmployeeDao employeeDao;

    @Override
    public Employee login(String sn) {
        return employeeDao.findEmpBySn(sn);
    }

    public void setEmployeeDao(EmployeeDao employeeDao) {
        this.employeeDao = employeeDao;
    }

    @Override
    public Employee findByPidAndDid(Integer pid, Integer did) {
        return employeeDao.findByPidAndDid(pid,did);
    }
}
